//
//  VideoDownLoadManager.h
//  News
//
//  Created by lanou3g on 15/11/10.
//  Copyright © 2015年 songhaowen. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "Singleton.h"
@class VideoModel;


@protocol VideoDownLoadManagerDelegate <NSObject>

-(void)videoDidUpdatedProgressWithVideoModel:(VideoModel *)model;
-(void)videoDidUpdatedDownloadSpeedWithVideoModel:(VideoModel *)model speed:(CGFloat)speed;

@end


@interface VideoDownLoadManager : NSObject
SingletonH(VideoDownLoadManager)


//  用来保存创建的下载管理类，方面以后的对应管理
@property(nonatomic, strong)NSMutableDictionary *httpOperationDict;
@property(nonatomic, weak)id<VideoDownLoadManagerDelegate>delegate;
@property(nonatomic, strong)NSMutableArray *downVideoArray;
@property(nonatomic, strong)NSOperationQueue *downLoadQueue;


#pragma mark 开始下载
-(void)startAVideoWithVideoModel:(VideoModel *)downLoadVideo;

#pragma mark 暂停下载
-(void)downloadPausewithModel:(VideoModel *)pauseModel;

#pragma mark 断点继续下载
-(void)downloadResumeWithModel:(VideoModel *)resumeModel;

@end
